//
//  DailyViewController.m
//  Streaming
//
//  Created by 官琛 on 15-6-23.
//  Copyright (c) 2015年 liuxun. All rights reserved.
//

#import "DailyViewController.h"

@interface DailyViewController ()

@end

@implementation DailyViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor lightGrayColor];
    
    DailyView *dailyView = [[DailyView alloc]initWithFrame:[[UIScreen mainScreen]bounds] movie:self.movieId];
    [self.view addSubview:dailyView];
    [dailyView release];
    dailyView.myDelegate = self;
    dailyView.myDelegate1 = self;
    dailyView.perDelegate = self;
  
//    self.navigationController.navigationBar.alpha = 0.1;
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"iconfont-fenxiang.png"] style:UIBarButtonItemStylePlain target:self action:@selector(barButtonAction:)];

    
//    self.navigationController.delegate = self;
    

    

}
//push  Person
-(void)pushPerson:(NSInteger)personId
{
    PersonViewController *per = [[PersonViewController alloc]init];
    per.personId = personId;
    [self.navigationController pushViewController:per animated:YES];
    [per release];

}
//push剧照
-(void)pushPhoto:(NSInteger)movieID
{
    PhotoViewController *photo = [[PhotoViewController alloc]init];
    photo.movieId = movieID;
    [self.navigationController pushViewController:photo animated:YES];
    [photo release];


}


//push影评界面
-(void)pushReview:(NSInteger)movID
{
    ReviewViewController *review = [[ReviewViewController alloc]init];
    review.movieID = movID;
   
    [self.navigationController pushViewController:review animated:YES];
    [review release];

}

//bar透明
- (void) navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
    // 如果进入的是当前视图控制器
    if (viewController == self) {
        // 背景设置为黑色
        self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.000 blue:1.000 alpha:1.000];
        // 透明度设置为0.3
        self.navigationController.navigationBar.alpha = 0.300;
        // 设置为半透明
        self.navigationController.navigationBar.translucent = YES;
    } else {
        // 进入其他视图控制器
        self.navigationController.navigationBar.alpha = 1;
        // 背景颜色设置为系统默认颜色
        self.navigationController.navigationBar.tintColor = nil;
        self.navigationController.navigationBar.translucent = NO;
    }
}



//收藏
-(void)buttonAction:(UIButton *)button
{
    

}

//分享
-(void)barButtonAction:(UIBarButtonItem *)button
{
    

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
